package for循环;

//统计水仙花数的个数

public class test06 {
    public static void main(String[] args) {
        int count = 0;
        for (int i = 100; i < 1000; i++) {
            int ge = i % 10;
            int shi = i / 10 % 10;
            int bai = i / 100 % 10;
            if (bai * bai * bai + shi * shi * shi + ge * ge * ge == i) {
                count++;
            }
        }
        System.out.println("水仙花数的个数为：" + count);
    }
}


